package com.kingsailor.gunsmith.admin.web.controller;

import edu.jetwinner.util.EasyStringUtil;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/sys/user/profile")
public class UserProfileController {

    private String urlPrefix = "modules/admin/user/profile";

    @GetMapping("/{active}")
    public String profile(@PathVariable String active, ModelMap mmap) {
        if(EasyStringUtil.isBlank(active)){
            active = "info";
        }
//        LoginUserEntity user = UserUtils.getUserInfo();
//        mmap.put("user", user);
        mmap.put("active",active);
//        mmap.put("err",super.getPara("err","").equals("5001")?"您的第三方账号已经有绑定系统账号不能重复绑定!":"");
        return urlPrefix + "/index";
    }

    @GetMapping("/avatar")
    public String avatar(ModelMap mmap){
        return urlPrefix + "/avatar";
    }
}
